/*
 * Copyright (c) 2019. ascend 版权所有禁止转载。
 */

package cn.edu.zua.demo07.util;

import java.util.Enumeration;
import java.util.Locale;
import java.util.ResourceBundle;

/**
 * 说明：简单的 Property 工具类
 *
 * @author ascend
 * 2019/1/24 9:29
 */
public class PropertyUtils {
    private ResourceBundle resource;

    public PropertyUtils(String fileName) {
        Locale locale = new Locale("zh", "CN");
        this.resource = ResourceBundle.getBundle(fileName, locale);
    }

    public String getValue(String key) {
        return resource.getString(key);
    }

    public Enumeration<String> getKeys() {
        return resource.getKeys();
    }
}
